import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index.vue'
import StudentList from '@/components/StudentList.vue'
import Start from '../components/start.vue'
import Login from '@/components/comps/Login.vue'
import Register from '@/components/comps/Register.vue'
import CreateCourse from '@/components/CreateCourse.vue'
import Course from '@/components/Course.vue'
import MemberList from '@/components/MemberList.vue'
import SelectImport from '@/components/SelectImport.vue'
import Class from '@/components/Class.vue'
import CourseClassList from '@/components/CourseClassList.vue'
import CreateClass from '@/components/CreateClass.vue'
import ClassMemberList from '@/components/ClassMemberList.vue'
import Scoring from '@/components/Scoring.vue'

import Main from '@/components/comps/Main.vue'
import List from '@/components/comps/List.vue'
import SelectImportClass from '@/components/SelectImportClass.vue'
import ScoreUpdate from '@/components/comps/ScoreUpdate.vue'
import PCLogin from '@/components/PCLogin.vue'
import PCIndex from '@/components/PCIndex.vue'
import UpdateCourse from '@/components/UpdateCourse.vue'
import PCIndexList from '@/components/PCIndexList.vue'
import PCClassList from '@/components/PCClassList.vue'
import PCCourseList from '@/components/PCCourseList.vue'
import PCMain from '@/components/PCMain.vue'
import PCClass from '@/components/PCClass.vue'
import PCCourse from '@/components/PCCourse.vue'
import logout from '@/components/logout.vue'
// import MyClass from '@/components/MyClass.vue'
import addMajor from '@/components/addMajor.vue'
import delMajor from '@/components/delMajor.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/index',
      name: 'Index',
      component: Index
    },
    {
      path: '/StudentList',
      name: 'StudentList',
      component: StudentList,
    },
    {
      path: '/',
      name: 'start',
      component: Start,
    },
    {
      path: '/login',
      name: 'Login',
      component: Login,
    },
    {
      path: '/Scoring',
      name: 'Scoring',
      component: Scoring,
      children:[
        {
          path: '/Scoring/Main/:titlename/:id',
          component: Main,
        },
        {
          path: '/Scoring/List/:titlename/:id',
          component: List,
        },
        {
          path: '/Scoring/ScoreUpdate/:titlename/:id',
          component: ScoreUpdate,
        },
      ]
    },
    {
      path: '/Register',
      name: 'Register',
      component: Register,
    },
    {
      path: '/CreateCourse',
      name: 'CreateCourse',
      component: CreateCourse,
    },
    {
      path: '/Course',
      name: 'Course',
      component: Course,
    },
    {
      path: '/MemberList',
      name: 'MemberList',
      component: MemberList,
    },
    {
      path: '/SelectImport/:id',
      name: 'SelectImport',
      component: SelectImport,
    },
    {
      path: '/MemberList/:titlename/:id',
      name: 'MemberList',
      component: MemberList,
    },
    {
      path: '/MemberList/:titlename/:id/UpdateCourse',
      name: 'UpdateCourse',
      component: UpdateCourse,
    },
    {
      path: '/CLass',
      name: 'Class',
      component: Class,
    },
    {
      path: '/CourseClassList',
      name: 'CourseClassList',
      component: CourseClassList,
    },
    {
      path: '/CreateClass',
      name: 'CreateClass',
      component: CreateClass,
    },
    {
      path: '/ClassMemberList',
      name: 'ClassMemberList',
      component: ClassMemberList,
    },
    {
      path: '/ClassMemberList/:titlename/:id',
      name: 'ClassMemberList',
      component: ClassMemberList,
    },
    {
      path: '/SelectImportClass/:id',
      name: 'SelectImportClass',
      component: SelectImportClass,
    },
    {
      path: '/PCLogin',
      name: 'PCLogin',
      component: PCLogin,
    },
    {
      path: '/PCIndex',
      name: 'PCIndex',
      component: PCIndex,
      children:[
        {
          path: '/PCIndex/PCIndexList',
          name: 'PCIndexList',
          component: PCIndexList,
        },
        {
          path: '/PCIndex/PCClassList',
          name: 'PCClassList',
          component: PCClassList,
        },
        {
          path: '/PCIndex/PCCourseList',
          name: 'PCCourseList',
          component: PCCourseList,
        },
        {
          path: '/PCIndex/ScoreUpdate/:titlename/:id',
          component: ScoreUpdate,
        },
        {
          path: '/PCIndex/CreateClass/',
          component: CreateClass,
        },
        {
          path: '/PCIndex/CreateCourse/',
          component: CreateCourse,
        },
        {
          path: '/PCIndex/Register/',
          component: Register,
        },
        {
          path: '/PCIndex/logout/',
          component: logout,
        }
      ]
    },
    {
      path: '/PCMain/:titlename/:id',
      name: 'PCMain',
      component: PCMain,
    },
    {
      path: '/PCClass/:titlename/:id',
      name: 'PCClass',
      component: PCClass,
    },
    {
      path: '/PCCourse/:titlename/:id',
      name: 'PCClass',
      component: PCCourse,
    },
    {
      path: '/logout',
      name: 'logout',
      component: logout,
    },
    {
      path: '/addMajor',
      name: 'addMajor',
      component: addMajor,
    },
    {
      path: '/delMajor',
      name: 'delMajor',
      component: delMajor,
    },
    
  ]
})
